#!/usr/bin/perl -w

use strict;

print "$0 pph.pred.txt\n";

open(PPH, $ARGV[0]);
open(SC, ">1.pph.score.txt");
open(POS, ">1.pph.pos.txt");

# (0.\d+|0|1) # 前两个的顺序不能替换，否则无法匹配第一种情形
# 匹配从 0 到 1 的浮点数
while (<PPH>) {
	if (/benign.*?(0.\d+|0|1)/) {
		print SC "benign\t$1\n";
	}elsif (/possibly damaging.*?(0.\d+|0|1)/) {
		print SC "possibly damaging\t$1\n";
	}elsif (/probably damaging.*?(0.\d+|0|1)/) {
		print SC "probably damaging\t$1\n";
	}

}

close(SC);

open(PPH, $ARGV[0]);
while (<PPH>) {
	if (/\# (chr.*)/) {
		print "$1\n";
		print POS "$1\n";
		
	}
}


close(POS);
close(PPH);


